<template>
  <div>
    <myheader bol="true">
      <img src="../../assets/images/ic_chat_white.png" class="rightImg" slot="right" />
      <div slot="search" class="search">
        <input type="text" placeholder="影视 图书 唱片 小组等" />
        <img src="../../assets/images/ic_group_search_small.png" class="searchImg" />
        <img src="../../assets/images/ic_scan_gray.png" class="scanImg" />
      </div>
    </myheader>
    <banner swiperid="go">
      <div class="swiper-slide" slot="swiper-con">
        <img src="../../assets/images/banner/01.jpg" />
      </div>
      <div class="swiper-slide" slot="swiper-con">
        <img src="../../assets/images/banner/02.jpg" />
      </div>
      <div class="swiper-slide" slot="swiper-con">
        <img src="../../assets/images/banner/03.jpg" />
      </div>
    </banner>
    <cell title="热点" hot=true></cell>
    <list v-for="(item,index) in arr" :author="item.target.author.name" :url="item.target.cover_url">
      <span slot="title">{{ item.title }}</span>
      <span slot="desc">{{ item.target.desc }}</span>
    </list>
  </div>
</template>

<script>
  import Myheader from '../../components/header.vue'
  import Banner from '../../components/banner.vue'
  import Cell from '../../components/cell.vue'
  import List from '../../components/news_list.vue'

  export default {
    data: function(){
      return{
        arr: []
      }
    },
    components: {
      Myheader,
      Banner,
      Cell,
      List
    },
    beforeCreate: function(){
      console.log(1);
      this.axios.get('http://hyh528.com/interface/douban_homeData.php').then((response)=>{
        console.log(response.data.recommend_feeds);
        this.arr = response.data.recommend_feeds;
      });
    },
    methods: {
      fn: function(){
      }
    }
  }
</script>

<style>

</style>
